<template>
    <div class="addstandard">
        <pagetitle type="2"></pagetitle>
        <el-form label-width="180px" :model="formLabelAlign">
            <el-card class="pageCard">
                <div class="pageCardTitle">标准基础信息</div>
                <el-form-item label="标准号：">
                    <el-input class="inputs" v-model="formLabelAlign.name" placeholder="请输入需要检索的标准号" />
                    <el-button type="primary" plain>检索</el-button>
                    <span class="inputsTip">* 从 地方标准库 中检索查重</span>
                </el-form-item>
                <el-form-item label="中文标准名称：">
                    <el-input class="inputs" v-model="formLabelAlign.name" placeholder="请输入标准的中文名称" />
                </el-form-item>
                <el-form-item label="英文标准名称：">
                    <el-input class="inputs" v-model="formLabelAlign.name" placeholder="请输入标准的英文名称" />
                </el-form-item>
                <el-form-item label="标准简介：">
                    <el-input type="textarea" class="textarea" :rows="4" resize="none" v-model="formLabelAlign.name" placeholder="请输入标准的简介" />
                </el-form-item>
            </el-card>

            <el-card class="pageCard">
                <div class="pageCardTitle">标准发布单位情况</div>
                <el-form-item label="平台发布单位：">
                    <el-input class="inputs" v-model="formLabelAlign.name" placeholder="请选择本标准的平台发布单位" />
                    <el-button type="primary" plain>选择</el-button>
                    <span class="inputsTip">*从 我的团队 中选择</span>
                </el-form-item>
                <el-form-item label="标准公开程度：">
                    <el-radio-group v-model="formLabelAlign.certificateType" size="large">
                        <div class="radiobutton" v-for="(item, index) in cardType" :key="index">
                            <el-radio-button :label="item" />
                        </div>
                    </el-radio-group>
                    <span class="inputsTip">
                        *完全公开，所有人可以查看；部分公开，平台和提出的团队可以调用数据，其他人无权查看；不公开，自己查看，其他人无权查看
                    </span>
                </el-form-item>
                <el-form-item label="版次：">
                    <el-input class="inputs" v-model="formLabelAlign.name" placeholder="V1.2" />
                    <span class="inputsTip">* 根据当前发布次序自动排列版次 ，1 代表发布人次序， 2 代表 第几次发布</span>
                </el-form-item>
            </el-card>

            <el-card class="pageCard">
                <div class="pageCardTitle">标准数据库文件上传</div>
                <el-form-item label="标准号检索：">
                    <div>
                        <el-input class="inputs" v-model="formLabelAlign.name" placeholder="检索或者上传本标准 转化为数据库 的标准模块" />
                        <el-button type="primary" plain>检索</el-button>
                        <span class="inputsTip">* 从 标准数据库 中检索。</span>
                    </div>
                </el-form-item>
                <el-form-item label="发布内容：">
                    <el-table :data="[{ type: 1 }, { type: 2 }]" class="tableheader" border style="width: 100%">
                        <el-table-column prop="date" label="序号" width="88">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">01</div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="name" label="标准号">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准号"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="分部编号">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入分部编号"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="文件名称">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入文件名称"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="分部名称">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入分部名称"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="版次">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入版次"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="操作" width="280">
                            <template #default="scope">
                                <div style="text-align: center" v-if="scope.row.type == 1">
                                    <el-button type="primary" link>文件上传</el-button>
                                    <el-divider direction="vertical" />
                                    <el-button type="primary" link>查看文档</el-button>
                                    <el-divider direction="vertical" />
                                    <el-button type="primary" link>删除</el-button>
                                </div>
                                <div style="text-align: center" v-else>
                                    <el-button type="primary" link>加一行</el-button>
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="inputsTip">免责声明：本平台标准资料仅供参考，使用标准请以正式出版的标准版本为准。</div>
                </el-form-item>
                <div class="subpageBtnBox">
                    <el-button type="primary" plain>返回</el-button>
                    <el-button type="primary" plain>提交审核</el-button>
                </div>
            </el-card>
            <!-- <el-card class="pageCard">
                <div class="pageCardTitle">引用标准情况</div>
                <el-form-item label="标准号检索：">
                    <div>
                        <el-input class="inputs" v-model="formLabelAlign.name" placeholder="从标准资源库中检索本标准的 引用标准" />
                        <el-button type="primary" plain>检索</el-button>
                        <span class="inputsTip">*从标准资源库 中检索</span>
                    </div>
                </el-form-item>
                <el-form-item label="发布内容：">
                    <el-table :data="[{ type: 1 }, { type: 2 }]" class="tableheader" border style="width: 100%">
                        <el-table-column prop="date" label="序号" width="88">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">01</div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="name" label="标准号">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准号"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="标准名称">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准名称"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="状态">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <div v-if="scope.row.type == 1">
                                        <el-select v-model="scope.row.companyName" class="m-2" placeholder="请选择状态">
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                        </el-select>
                                    </div>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="发布日期">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-date-picker
                                        style="width: 100%"
                                        v-model="scope.row.companyName"
                                        type="date"
                                        placeholder="请选择发布日期"
                                        format="YYYY-MM-DD"
                                        value-format="YYYY-MM-DD"
                                    />
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="实施日期">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-date-picker
                                        style="width: 100%"
                                        v-model="scope.row.companyName"
                                        type="date"
                                        placeholder="请选择实施日期"
                                        format="YYYY-MM-DD"
                                        value-format="YYYY-MM-DD"
                                    />
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="操作" width="280">
                            <template #default="scope">
                                <div style="text-align: center" v-if="scope.row.type == 1">
                                    <el-button type="primary" link>查看文档</el-button>
                                    <el-divider direction="vertical" />
                                    <el-button type="primary" link>删除</el-button>
                                </div>
                                <div style="text-align: center" v-else>
                                    <el-button type="primary" link>加一行</el-button>
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="inputsTip">免责声明：本平台标准资料仅供参考，使用标准请以正式出版的标准版本为准。</div>
                </el-form-item>
            </el-card> -->

            <!-- <el-card class="pageCard">
                <div class="pageCardTitle">采用标准文本上传</div>
                <el-form-item label="标准号检索：">
                    <div>
                        <el-input class="inputs" v-model="formLabelAlign.name" placeholder="从标准资源库中检索本标准采用的 国际标准" />
                        <el-button type="primary" plain>检索</el-button>
                        <span class="inputsTip">*从标准资源库 中检索</span>
                    </div>
                </el-form-item>
                <el-form-item label="发布内容：">
                    <el-table :data="[{ type: 1 }, { type: 2 }]" class="tableheader" border style="width: 100%">
                        <el-table-column prop="date" label="序号" width="88">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">01</div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="name" label="标准号">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准号"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="标准名称">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准名称"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="状态">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <div v-if="scope.row.type == 1">
                                        <el-select v-model="scope.row.companyName" class="m-2" placeholder="请选择状态">
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                        </el-select>
                                    </div>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="发布日期">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-date-picker
                                        style="width: 100%"
                                        v-model="scope.row.companyName"
                                        type="date"
                                        placeholder="请选择发布日期"
                                        format="YYYY-MM-DD"
                                        value-format="YYYY-MM-DD"
                                    />
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="实施日期">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-date-picker
                                        style="width: 100%"
                                        v-model="scope.row.companyName"
                                        type="date"
                                        placeholder="请选择实施日期"
                                        format="YYYY-MM-DD"
                                        value-format="YYYY-MM-DD"
                                    />
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="操作" width="280">
                            <template #default="scope">
                                <div style="text-align: center" v-if="scope.row.type == 1">
                                    <el-button type="primary" link>查看文档</el-button>
                                    <el-divider direction="vertical" />
                                    <el-button type="primary" link>删除</el-button>
                                </div>
                                <div style="text-align: center" v-else>
                                    <el-button type="primary" link>加一行</el-button>
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="inputsTip">
                        免责声明：该推荐性标准采用了ISO、IEC等国际国外组织的标准，由于涉及版权保护问题，以在线查看，但是不可以下载；涉及侵权，由平台发布单位承担。
                    </div>
                </el-form-item>
            </el-card> -->
            <!-- <el-card class="pageCard">
                <div class="pageCardTitle">标准数据库文件上传</div>
                <el-form-item label="标准号检索：">
                    <div>
                        <el-input class="inputs" v-model="formLabelAlign.name" placeholder="检索或者上传本标准 转化为数据库 的标准模块" />
                        <el-button type="primary" plain>检索</el-button>
                        <span class="inputsTip">*从标准资源库 中检索</span>
                    </div>
                </el-form-item>
                <el-form-item label="发布内容：">
                    <el-table :data="[{ type: 1 }, { type: 2 }]" class="tableheader" border style="width: 100%">
                        <el-table-column prop="date" label="序号" width="88">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">01</div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="name" label="标准号">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准号"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="标准名称">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-input v-model="scope.row.companyName" placeholder="请输入标准名称"></el-input>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="状态">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <div v-if="scope.row.type == 1">
                                        <el-select v-model="scope.row.companyName" class="m-2" placeholder="请选择状态">
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                        </el-select>
                                    </div>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="发布日期">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-date-picker
                                        style="width: 100%"
                                        v-model="scope.row.companyName"
                                        type="date"
                                        placeholder="请选择发布日期"
                                        format="YYYY-MM-DD"
                                        value-format="YYYY-MM-DD"
                                    />
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="实施日期">
                            <template #default="scope">
                                <div v-if="scope.row.type == 1">
                                    <el-date-picker
                                        style="width: 100%"
                                        v-model="scope.row.companyName"
                                        type="date"
                                        placeholder="请选择实施日期"
                                        format="YYYY-MM-DD"
                                        value-format="YYYY-MM-DD"
                                    />
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="address" label="操作" width="280">
                            <template #default="scope">
                                <div style="text-align: center" v-if="scope.row.type == 1">
                                    <el-button type="primary" link>文件上传</el-button>
                                    <el-divider direction="vertical" />
                                    <el-button type="primary" link>查看文档</el-button>
                                    <el-divider direction="vertical" />
                                    <el-button type="primary" link>删除</el-button>
                                </div>
                                <div style="text-align: center" v-else>
                                    <el-button type="primary" link>加一行</el-button>
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="inputsTip">
                        说明：标准数据库文件是单一可查询数据库文件；采用Excel等数据库格式；可以在线查看，但是不可以下载；涉及侵权，由平台发布单位承担
                    </div>
                </el-form-item>
                <div class="subpageBtnBox">
                    <el-button type="primary" plain>返回</el-button>
                    <el-button type="primary" plain>提交审核</el-button>
                </div>
            </el-card> -->
        </el-form>
    </div>
</template>
<script lang="ts" setup>
import { ref, reactive } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
if (route.query.type == "1") {
    route.meta.list = ["国家标准", "国家标准数据库"];
} else if (route.query.type == "2") {
    route.meta.list = ["行业标准", "行业标准数据库"];
} else if (route.query.type == "3") {
    route.meta.list = ["地方标准", "地方标准数据库"];
}
const formLabelAlign: any = reactive({
    certificateType: "完全公开",
});
const cardType = ref(["完全公开", "部分公开", "不公开"]);
</script>
<style lang="scss" scoped>
.pageCard {
    margin-bottom: 20px;
    .pageCardTitle {
        font-size: 14px;
        font-weight: bold;
        color: #252b3a;
        margin-bottom: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-right: 140px;
    }
    .textarea {
        width: 1260px;
    }
    .inputs {
        width: 505px;
        margin-right: 10px;
    }
    .inputs1 {
        width: 140px;
        margin-right: 10px;
    }
    .inputs3 {
        width: 355px;
        margin-right: 10px;
    }
    .inputs4 {
        width: 1170px;
        margin-right: 10px;
    }
    .inputsTip {
        margin-left: 10px;
        font-size: 12px;
        color: #999999;
    }
    .cardHr {
        width: 100%;
        height: 1px;
        border: 1px dashed #cccccc;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    .toeBtns {
        width: 120px;
    }
}
</style>
<style>
.addstandard .el-date-editor.el-input {
    width: 505px;
}
.addstandard .radiobutton {
    width: 162px;
    height: 30px;
    border-radius: 4px;
    margin-right: 10px;
}
.addstandard .radiobutton .el-radio-button .el-radio-button__inner {
    height: 30px;
    line-height: 30px;
    text-align: center;
    padding: 0;
    width: 162px;
    border: none;
    background: #f1f1f1;
}
.addstandard .radiobutton .el-radio-button.is-active .el-radio-button__inner {
    background: #23b14d;
}
.tableheader .el-input__wrapper {
    box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
    background: none;
}
</style>
